<template>
    <div>
        <!-- v-if指令 -->
        <span v-if="isUse">1111111</span>
        <br/>
        <span v-show="isUse">22222</span>
        <br/>
        <button @click=gb()>切换</button>
        <hr>
        <!-- v-for指令 -->
        <ul>
            <li v-for="(item,index) in nums" :key="index">{{item}}--{{index}}</li>
        </ul>
        <hr>
        <!-- v-model -->
        <input type="text" v-model.lazy="msg" />

    </div>
</template>

<script>
export default {
    data() {
        return {
            isUse: true,
            nums:[1,2,3,4],
            msg:"hello"

        }
    },
    methods: {
        gb() {
            this.isUse=!this.isUse;
        }
    },
}
</script>

<style scoped>

</style>